﻿import com.dmotiko.mirador.*
import com.dmotiko.general.*
import mx.transitions.*;
import mx.transitions.easing.*;
import mx.utils.Delegate;

class MiradorDmologo
extends Dmologo {
	
	private function initClip():Void {
		this.enabled = false;
		this._alpha = 0;
		MiradorSite.getApp().addEventListener( WebSite.SECTION_CHANGED, Delegate.create( this, section_changed ));
		section_changed( { section: MiradorSite.getApp().getSection() } );
	}
	
	private function section_changed( evnt ):Void {
		if ( evnt.section == MiradorSite.HOME) {
			this.enabled = true;
			tFade = new Tween( this, "_alpha", Regular.easeOut, this._alpha, 35, 0.5, true);
			
		} else {
			this.enabled = false;
			tFade = new Tween( this, "_alpha", Regular.easeOut, this._alpha, 0, 0.5, true);
		}
	}
		
}